



#include "../../1_Application/Include/APP_WorkingNormalState.h"

#include "../../2_Process/Include/Cmp_LQC_Process.h"

#define __SET_ERROR_H__
#include "../../3_Component/Include/Cmp_SetError.h"
#undef __SET_ERROR_H__
#include "../../3_Component/Include/Cmp_KeyScan.h"


#include "../../4_Library/Include/general.h"
#include "../../4_Library/Include/Int.h"
#include "../../4_Library/Include/Lib_UartComm.h"
#include "../../4_Library/Include/Lib_CommSubMicom.h"
#include "../../4_Library/Include/Lib_SensingADC.h"
#include "../../4_Library/Include/Lib_EEPROM.h"


#include "../../6_Vablesource/Include/Vable_ModelInformation.h"



void Cmp_ErrorCheck()
{
	T_ERROR_STEP ErChk_STEP;

	for(ErChk_STEP = SE_STEP; ErChk_STEP < ERROR_MAX; ErChk_STEP++)
	{
		if(ErrorCheck[ErChk_STEP]())
		{
			break;
		}
		else
		{;}
	}

}

UINT8 StandByErrorCheck()
{
	if(Get_JigPlatform() != JigUpdate)
	{
		if(Standby_Signal_Flag ==SET)
		{
			PRE_ERROR = NO_ERROR;
		}
		else
		{
			PRE_ERROR = SE_ERROR;
			return ERROR;
		}

	}
	else
	{;}


	return NO_ERROR;
}



UINT8 DE4ErrorCheck()
{
	switch(Get_JigPlatform())
	{
		case Vivace:
			if(Get_PanelType() != VBF_PanelType)
			{
				if(Get_DoorState() == DOOR_CLOSE)
				{
					PRE_ERROR = NO_ERROR;
				}
				else
				{
					PRE_ERROR = VVC_DE4_ERROR;
					return ERROR;
				}
                        }
			else
			{
				if(Door_SEN_SIGNAL_Flag == 1)
				{
					PRE_ERROR = NO_ERROR;
				}
				else
				{
					PRE_ERROR = VVC_DE4_ERROR;
					return ERROR;
				}
			}
			break;

		case Topgun_WW:
			if(Door_SEN_SIGNAL_Flag == 1)
			{
				PRE_ERROR = NO_ERROR;
			}
			else
			{
				PRE_ERROR = Topgun_DE4_ERROR;
				return ERROR;
			}
			break;

		case LCD_NT_VX:
			break;

		default:
			break;
	}

	return NO_ERROR;

}




